package com.neuedu.spring.mybatis.po;

import java.io.Serializable;

/**
 * 上传文件和检验、检查项目的对应关系
 * @TableName item_upload
 */
public class ItemUpload implements Serializable {
    /**
     * 项目Id
     */
    private Long itemId;

    /**
     * 上传文件Id
     */
    private Long uploadId;

    /**
     * 1 检查项目上传 2 检验上传的文件
     */
    private Integer type;

    private static final long serialVersionUID = 1L;

    /**
     * 项目Id
     */
    public Long getItemId() {
        return itemId;
    }

    /**
     * 项目Id
     */
    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    /**
     * 上传文件Id
     */
    public Long getUploadId() {
        return uploadId;
    }

    /**
     * 上传文件Id
     */
    public void setUploadId(Long uploadId) {
        this.uploadId = uploadId;
    }

    /**
     * 1 检查项目上传 2 检验上传的文件
     */
    public Integer getType() {
        return type;
    }

    /**
     * 1 检查项目上传 2 检验上传的文件
     */
    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ItemUpload other = (ItemUpload) that;
        return (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getUploadId() == null ? other.getUploadId() == null : this.getUploadId().equals(other.getUploadId()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getUploadId() == null) ? 0 : getUploadId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", itemId=").append(itemId);
        sb.append(", uploadId=").append(uploadId);
        sb.append(", type=").append(type);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}